package com.atguigu.wc.util;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Objects;
import java.util.Properties;

/**
 * @Author:GaoFei
 * @Description:
 * @Date:Created in 18:11
 * @Modified By:
 */
public class ResourceUtils {
    public static Properties load(String path) {
        Properties properties = new Properties();
        try {
            properties.load(new InputStreamReader(Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResourceAsStream(path))));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties;
    }
}
